#include<stdio.h>
#include<ctype.h>
int main()
{
    char ch;
    scanf("%c",&ch);
    if(ch>='A'&&ch<='Z')
{
        char sh = tolower(ch);
        printf("%c",sh);
}
    else 
{
        char sh = toupper(ch);
        printf("%c",sh);
}
return 0;
}
